#pragma once
#include <boost/noncopyable.hpp>
#include "MapFwd.hpp"
#include "BuildingPtr.hpp"
#include "TerrainMaterialManager.hpp"
#include "BuildingVector.hpp"
#include "BuildingMaterialManager.hpp"
#include "ImportExport.hpp"

namespace he
{
	//! The whole world.
	/*!
		World contain all elements as maps, buildings, players, ... .
	*/
	class World : boost::noncopyable
	{
		// Attributes
	private:
		//! Map used in world.
		MapPtr_t m_pMap;
		//! Buildings.
		BuildingVector_t m_Buildings;
		//! Terrain material manager.
		TerrainMaterialManager m_TerrainMaterialManager;
		//! Building material manager.
		BuildingMaterialManager m_BuildingMaterialManager;

		// Operations
	public:
		//! Get map.
		HE_ENGINE_API Map &map();
		//! Get map.
		HE_ENGINE_API Map const &map() const;
		//! Buildings.
		HE_ENGINE_API BuildingVector_t const &buildings() const;
		//! Add building.
		HE_ENGINE_API void add(BuildingPtr_t &&pBuilding);
		//! Get terrain material manager.
		HE_ENGINE_API TerrainMaterialManager const &terrain_material_manager() const;
		//! Get building material manager.
		HE_ENGINE_API BuildingMaterialManager const &building_material_manager() const;

		// Construction/Destruction
	public:
		HE_ENGINE_API World(MapPtr_t const &pMap, boost::filesystem::path const &TerrainDefinitionPath);
	};
} /*he*/
